package com.example.proxypattern.proxy;

/**
 * @author ash
 * @description
 * @create 2022/12/7  23:38:52
 * @className Proxy
 * @verson 1.0.0
 */
public class Proxy extends Subject {


    RealSubject realSubject;


    @Override
    public void request() {
        if (realSubject == null) {

            realSubject = new RealSubject();
        }
        System.out.println("Proxy#request方法开始执行");
        realSubject.request();
    }
}
